from tkinter.messagebox import showwarning as warning,showinfo as success,showerror as fail
from service.login_service import login_button,get_input
"""用户登录"""
def login_handle():
    username,password = get_input()
    if username == "" or password == "":
        warning(title='警告', message='用户名或密码不能为空！')
    elif username == "admin" and password == "123456":
        success(title='成功', message='恭喜你，登录成功！')
    else:
        fail(title='失败', message='用户名或密码错误！')

login_button(login_handle) # 添加登录逻辑